import request from '@/utils/request'

const BASE_URL='/admin/system/sysCommunity';

export default{

    getPageList(page,limit,searchObj){
      return request({
            url:`${BASE_URL}/${page}/${limit}`,
            method:'get',
            params:searchObj
        })
    },
    //修改前查询当前id的小区数据
    getCommunityById(id){

        return request({
            url:`${BASE_URL}/finCommunityById/${id}`,
            method:'get',
        })
    },

    //修改小区
    updateCommunity(sysCommunity){
        return request({
            url:`${BASE_URL}/updateCommunity`,
            method:'post',
            data:sysCommunity
        })
    },


    //添加小区
    addCommunity(sysCommunity){
        return request({
            url:`${BASE_URL}/addCommunity`,
            method:'post',
            data:sysCommunity
        })
    },
    //删除小区
    removeById(id){
        return request({
            url:`${BASE_URL}/removeCommunityById/${id}`,
            method:'get'
        })
    },
    //查询所有小区
    finAllCommunity(){
        return request({
            url:`${BASE_URL}/finAllCommunity`,
            method:'get'
        })
    }
}